package com.io.controller;

import com.io.entity.one2one.Husband;
import com.io.service.TbHusbandService;
import com.io.vo.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * The class/interface
 *
 * @author guodd
 * @version 1.0 use jdk 1.8
 */
@RestController
public class HusbandController {
    @Autowired
    private TbHusbandService tbHusbandService;

    @GetMapping(value = "/getAll")
    public ApiResult getAll() {
        List<Husband> hus = tbHusbandService.getHus();
        return ApiResult.ok(hus);
    }
}
